import React ,{useEffect}from 'react'
import counterStore from '../store/counterStore'
import {observer} from 'mobx-react-lite'

function asyncChannel() {
    // 创建响应式的数据源
    // const channerStore=useState()


    useEffect(()=>{
        counterStore.setChangeList()
    },[])
  return (
    <div>
        <ul>
            {
                counterStore.channelList.map(item=>{
                    return <li key={item.id}>{item.name}</li>
                })
            }
        </ul>
    </div>
  )
}

export default observer(asyncChannel)
